﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:vm="clr-namespace:FR.SAFTAnalyser.ViewModels"
                    xmlns:vw="clr-namespace:FR.SAFTAnalyser.Views">

    <!--  This template applies an SaftView  to an instance of the HeaderViewModel class shown in the main window. -->
    <DataTemplate DataType="{x:Type vm:SaftViewModel}">
        <vw:SaftView />
    </DataTemplate>

    <DataTemplate DataType="{x:Type vm:ConvertPublicKeyViewModel}">
        <vw:ConvertPublicKeyView />
    </DataTemplate>
    <DataTemplate DataType="{x:Type vm:CustomersViewModel}">
        <vw:CustomersView />
    </DataTemplate>
    <DataTemplate DataType="{x:Type vm:ErrorMessagesViewModel}">
        <vw:ErrorMessagesView />
    </DataTemplate>
    <DataTemplate DataType="{x:Type vm:GeneralLedgerEntriesViewModel}">
        <vw:GeneralLedgerEntriesView />
    </DataTemplate>
    <DataTemplate DataType="{x:Type vm:GeneralLedgerViewModel}">
        <vw:GeneralLedgerView />
    </DataTemplate>
    <DataTemplate DataType="{x:Type vm:HeaderViewModel}">
        <vw:HeaderView />
    </DataTemplate>
    <DataTemplate DataType="{x:Type vm:InvoicesViewModel}">
        <vw:InvoicesView />
    </DataTemplate>
    <DataTemplate DataType="{x:Type vm:ProdutsViewModel}">
        <vw:ProdutsView />
    </DataTemplate>
    <DataTemplate DataType="{x:Type vm:SupplierViewModel}">
        <vw:SupplierView />
    </DataTemplate>
    <DataTemplate DataType="{x:Type vm:TaxViewModel}">
        <vw:TaxView />
    </DataTemplate>
    
    <!-- This template explains how to render a tab item with a close button. -->
    <DataTemplate x:Key="ClosableTabItemTemplate">
        <ContentPresenter VerticalAlignment="Center"
                          Content="{Binding Path=DisplayName}" />
    </DataTemplate>

    <!-- This template explains how to render the 'Workspace' content area in the main window. -->
    <DataTemplate x:Key="WorkspacesTemplate">
        <TabControl IsSynchronizedWithCurrentItem="True" Margin="4"
                ItemsSource="{Binding}" 
                ItemTemplate="{StaticResource ClosableTabItemTemplate}"/>
    </DataTemplate>
</ResourceDictionary>